<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<input id="pageNow" name="pageNow" value="${pageVo.pageNow}" type="hidden">
<input id="pageSize" name="pageSize" value="${pageVo.pageSize}" type="hidden">

<div class="row cl pd-20">
	<div class="form-label col-4 text-l">
		显示 <select class="select"
			onchange="EXForm.changePageSize(this.value)"
			style="width: 80px;">
			<option <c:if test="${pageVo.pageSize eq 10}">selected="selected" </c:if> value="10">10</option>
			<option <c:if test="${pageVo.pageSize eq 20}">selected="selected" </c:if> value="20">20</option>
			<option <c:if test="${pageVo.pageSize eq 50}">selected="selected" </c:if> value="50">50</option>
			<option <c:if test="${pageVo.pageSize eq 100}">selected="selected" </c:if> value="100">100</option>
			<option <c:if test="${pageVo.pageSize eq 200}">selected="selected" </c:if> value="200">200</option>
			<option <c:if test="${pageVo.pageSize eq 500}">selected="selected" </c:if> value="500">500</option>
		</select> 条
	</div>
	<div class="col-8 text-r pagingBox">
		<div class="pageNav">


			<b>共<span class='text-primary'>${pageVo.pageCount}</span>页 当前 <span
				class='text-primary'>${pageVo.pageNow}</span>页
			</b>
			<%--上一页 --%>
			<c:choose>
				<c:when test="${pageVo.pageNow eq 1 }">
					<a class="pageNum">&lt;上一页</a>
				</c:when>
				<c:otherwise>
					<a onclick="EXForm.changePageNow(${pageVo.pageNow -1 })"
						class="pageNum">&lt;上一页</a>
				</c:otherwise>
			</c:choose>
			<c:choose>
				<c:when test="${pageVo.pageCount <= 6 }">
					<c:set var="begin" value="1" />
					<c:set var="end" value="${pageVo.pageCount }" />
				</c:when>
				<c:otherwise>
					<c:set var="begin" value="${pageVo.pageNow-2 }" />
					<c:set var="end" value="${pageVo.pageNow + 3}" />
					<c:if test="${begin < 1 }">
						<c:set var="begin" value="1" />
						<c:set var="end" value="6" />
					</c:if>
					<c:if test="${end > pageVo.pageCount }">
						<c:set var="begin" value="${pageVo.pageCount-5 }" />
						<c:set var="end" value="${pageVo.pageCount }" />
					</c:if>
				</c:otherwise>
			</c:choose>

			<c:if test="${pageVo.pageNow >3 }">
				<a class="pageNum" onclick="EXForm.changePageNow(1)">首页</a>
			</c:if>
			<c:forEach begin="${begin }" end="${end }" var="i">
				<c:choose>
					<c:when test="${i eq pageVo.pageNow }">
						<b>${i}</b>
						<!-- 当前页 -->
					</c:when>
					<c:otherwise>
						<a class="pageNum" onclick="EXForm.changePageNow(${i})">${i}</a>
					</c:otherwise>
				</c:choose>
			</c:forEach>
			<c:if test="${end < pageVo.pageCount }">
				<a class="pageNum"
					onclick="EXForm.changePageNow(${pageVo.pageCount})">尾页</a>
			</c:if>
			<%--下一页 --%>
			<c:choose>
				<c:when test="${pageVo.pageNow eq pageVo.pageCount }">
					<a class="pageNum">下一页&gt;</a>
				</c:when>
				<c:otherwise>
					<a class="pageNum"
						onclick="EXForm.changePageNow(${pageVo.pageNow+1})">下一页&gt;</a>
				</c:otherwise>
			</c:choose>
		</div>
	</div>
</div>



